$(function(){
    var option = {
        url: '../log/list',
        pagination: true,	//显示分页条
        sidePagination: 'server',//服务器端分页
        showRefresh: true,  //显示刷新按钮
        search: true,
        toolbar: '#toobar',
        striped : true,     //设置为true会有隔行变色效果
        columns: [
            {
                field: 'id',
                title: '序号',
                width: 40,
                formatter: function(value, row, index) {
                    var pageSize = $('#table').bootstrapTable('getOptions').pageSize;
                    var pageNumber = $('#table').bootstrapTable('getOptions').pageNumber;
                    return pageSize * (pageNumber - 1) + index + 1;
                }
            },
            {checkbox:true},
            { title: '日志ID', field: 'id' ,sortable:true},
            { title: '操作用户', field: 'username'},
            { title: '操作描述', field: 'operation'},
            { title: '具体方法', field: 'method' },
            { title: '参数', field: 'params' },
            { title: 'ip', field: 'createData'},
            { title: '执行时间', field: 'createTime'}
        ]};
    $('#table').bootstrapTable(option);
});

var vm = new Vue({
	el:'#dtapp',
    methods:{
        del: function(){

            doTask('id', '删除', 'log/del');
        }
    }
});